home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dskut / docp_1_1.zip / DOCP.DOC < prev    next >
Text File  |  1992-04-29  |  10KB  |  223 lines

  1. docp - directory-oriented file copy
  2. Version 1.1, Copyright (c) 1992, Roy Bixler
  3.  
  4. General Idea:
  5.  
  6.     Docp is a directory-oriented copy program.  It gives you better
  7.     control over which files you can copy or move.  In the simplest
  8.     case, all files are copied from the source directory to the target
  9.     directory.  A list of files can be specified to limit what is
  10.     copied.  This list can have wild-card file specifications (default
  11.     list = *.*) and may be applied against either the source or target
  12.     directory (default = source).  If a file specification in the list
  13.     starts with a '-', it is excluded from the copy.  File dates and
  14.     times can be used to limit the file list.  Recursive copies are
  15.     also supported.
  16.  
  17. Usage:
  18.  
  19.     docp [-abcdfghijlmnorstvwz?] source_dir target_dir [file_list]
  20.  
  21. Options:
  22.  
  23.     Multiple criteria options ('-a', '-d', '-n', '-o', and '-w') are
  24.     AND'ed together.  For example, specifying '-an' means copy the
  25.     source files which are newer and have the archive bit set.  If
  26.     either condition is false, the copy will not be done.  If you wish
  27.     to copy either the newer files or the files with the archive bit
  28.     set, just do two separate 'docp' commands (i.e. 'docp -a' followed
  29.     by 'docp -n').
  30.  
  31.     The options are described below:
  32.  
  33.     -a - Use archive bit
  34.         Copy only files which have the archive bit set.  Once the copy
  35.         is complete, the archive bit for the source file will be
  36.         turned off.
  37.  
  38.     -b - Batch mode.
  39.         Turn off all interactive prompts.  Where questions are
  40.         normally asked, the following default actions are taken
  41.         instead.  If the target directory does not exist, try to
  42.         create it.  If a target file is read-only, delete the target
  43.         and re-try the copy.  Also, if the target device fills up, the
  44.         program simply prints a message and aborts.
  45.  
  46.     -c - Check
  47.         Check the operation of the 'docp' command without actually
  48.         copying any files.  This mode sets the verbose options.
  49.  
  50.     -d [boa]mm/dd/yy - Date
  51.         Copy files based on the date that they were last changed.
  52.         This flag takes one argument starting with the letters 'b',
  53.         'o', or 'a', followed by the date in the form, mm/dd/yy.  The
  54.         prefix 'b' stands for 'before' but not including the specified
  55.         date.  The prefix 'o' stands for 'on' the specified date, and
  56.         'a' stands for 'after' the specified date.  The date ranges
  57.         specified using the 'a' and 'b' prefixes are 'and-ed'
  58.         together.  The 'o' dates are then 'or-ed' with the result.
  59.         For example to specify all files last-changed during March,
  60.         you could type:
  61.             docp -vd ao3/1/91 -d b4/1/91 . a:
  62.  
  63.     -f file_name - File
  64.        Get the file list from the file which is specified as an
  65.        argument following the '-f' flag.  If the file_name is "-" then
  66.        the file list will come from standard input.
  67.  
  68.     -g - Gather
  69.         Gather the files from the source directory and all its
  70.         subdirectories into the one target directory.
  71.  
  72.     -h - Hidden
  73.         Copy hidden files as well as non-hidden files.  Applies to
  74.         '-z - zap target' option below.
  75.  
  76.     -i - Interactive
  77.         Interactively ask the user if he wishes to copy each file,
  78.         before the copy occurs.  Also applies to '-z - zap target'
  79.         option below.
  80.  
  81.     -j - Join files
  82.         This is the companion of the '-l' option (see below).  If a
  83.         file with the same name as the source file exists in the
  84.         target directory, append the source file to the target file.
  85.  
  86.     -l - Larger than target
  87.         Split up files that are larger than target.  See the 'Disk
  88.         Overflow' section below for further explanation.
  89.  
  90.     -m - Move
  91.         Removes all copied files from the source directory.
  92.  
  93.     -n - Newer
  94.         Copy only newer files.  If the source file already has a copy
  95.         in the target directory, then the copy or move only occurs if
  96.         the source file has a later date/time stamp then the target
  97.         copy.  If a source file does not already exist in the target
  98.         directory, then the source file is copied. This option can be
  99.         handy for doing fast backups.
  100.  
  101.     -o - Older
  102.         Copy only older files.  If the source file already has a copy
  103.         in the target directory, then the copy or move only occurs if
  104.         the source file has an earlier date/time stamp then the target
  105.         copy.  If a source file does not already exist in the target
  106.         directory, then the source file is copied. This option can be
  107.         handy for quickly restoring backups.
  108.  
  109.     -no - Not On target
  110.         Copy only if the source file does not exist in the target
  111.         directory.  This is a trick that uses the '-n' and '-o'
  112.         options.
  113.  
  114.     -r - Recursive
  115.         Recursively copy all of the subdirectories of the source
  116.         directory.  Subdirectories that don't already exist under the
  117.         target directory are created.  Also, if the '-z - zap target'
  118.         option is specified, recursively deletes target subdirectories.
  119.  
  120.     -s - Source
  121.         Apply the file list to the source directory. This is the
  122.         default.  The alternative is '-t'.
  123.  
  124.     -t - Target
  125.         Apply the file list to the target directory. For example,
  126.         typing 'docp -t . a:', would copy only those files in the
  127.         current directory which were already on the 'A' drive.  This
  128.         is handy for doing backups.
  129.  
  130.     -v - Verbose
  131.         Report all files that are copied or moved.
  132.  
  133.     -vv - Very Verbose
  134.         Report all files that are copied or not copied.
  135.  
  136.     -w [ba]hh:mm[pa] - When
  137.         Copy files based on the time that they were last changed.
  138.         This flag takes one argument starting with the letters 'b', or
  139.         'a', followed by the time in the form, hh:mm[ap].  The prefix
  140.         'b' stands for 'before' but not including the specified time.
  141.         and the prefix 'a' stands for 'after' the specified date.  The
  142.         time ranges specified using the 'a' and 'b' prefixes are
  143.         'and-ed' together.  For example to specify all files
  144.         last-changed after 10:00pm but before 11:00pm you could type:
  145.             docp -vt a10:00p -t b11:00p . a:
  146.         If this option is used without the date option, then the
  147.         current system date is assumed.
  148.  
  149.     -z - Zap
  150.         Zap (i.e. clear all files) in the target directory
  151.         (or directories) before copying.
  152.  
  153.     -?
  154.         Print full documentation and exit.  You are here!
  155.  
  156. Disk Overflow:
  157.  
  158.     If the destination drive is full during a copy, then 'docp' will
  159.     pause and allow the user to change diskettes.  If the user
  160.     specified '-o', '-n', or '-t' then she will not be able to change
  161.     floppies.  This is because the original floppy was used to
  162.     determine which files to copy.  The '-l' option is useful here,
  163.     since the file that caused the target to be full will remain on
  164.     the current target and will continue to be copied on the new
  165.     target as a split file.  Without '-l', this file will be erased on
  166.     the current target and the copy will be retried on the new target.
  167.  
  168. File List:
  169.  
  170.     If not specified, the default file list is '*.*'.  Any files
  171.     prefixed with '-' will be excluded from the file list.  For
  172.     example, to copy all files in a directory except a file called
  173.     'junk' or those with a '.obj' suffix, you could type:
  174.         docp -v . a: *.* -junk -*.obj
  175.     or
  176.         docp -v . a: -junk -*.obj
  177.  
  178.     To copy a file starting with '-', use a prefix of '\'.  For
  179.     example, to copy a file named '-copy.me', you could type:
  180.         docp -v . a: \-copy.me
  181.  
  182.     On a recursive copy, the file list is applied recursively to the
  183.     source or target (with '-t' option) directory and all
  184.     subdirectories.
  185.  
  186. Nonexistent Target Directory:
  187.  
  188.     If the target directory does not exist, either the user will be
  189.     asked if she wishes to create it or, if the '-b' option is
  190.     specifi